<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>1</title>
</head>
<body>
<script>
    //分别打印：0-100奇数,偶数和
    var sum1=0;
    var sum2=0;
    for (let i = 0; i <= 100; i++) {
        if (i%2==0){
            sum1+=i;
        }
        else if (i%2!=0){
            sum2+=i;
        }
    }
    console.log("0-100偶数和:"+sum1);
    console.log("0-100奇数和:"+sum2);
</script>
</body>
</html>